import { stringify } from 'qs';
import request from '@/utils/request';

//查询
export async function searchFormIf (params) {
  let url = '/iot/dmp/v1/tenants/list'
  return request(url, {
    method: 'POST',
    body: {
      ...params
    },
  });
}

//新增
export async function addForm (params) {
  let url = '/iot/dmp/v1/tenants/create'
  return request(url, {
    method: 'POST',
    body: {
      ...params
    },
  });
}

//删除
export async function deleteReq (params) {

  let url = `/iot/dmp/v1/tenants/delete/${params.tenant_id}`
  return request(url, {
    method: 'GET', 
  });
}

//修改
export async function editForm (params) {

  let url = `/iot/dmp/v1/tenants/update/${params.tenant_id}`
  const data = params.values;
  data.tenant_id = params.tenant_id;
  return request(url, {
    method: 'POST',
    body: data,
  });
}

